/*
 * @Author: qin
 * @Date:   2018-08-28
 * +----------------------------------------------------------------------
 * | admin [ 后台管理系统公共配置信息 ]
 * | 勘察设计院成果确认相关接口模块
 * +----------------------------------------------------------------------
 */
layui.define(['jquery', 'configure', 'configureCom','bluebird'], function (exports) {
    var configure = layui.configure;
    var configureCom = layui.configureCom;
    var confirmGain = {
        param: {
            data: {}
        },
        confirmGain: function () {
            // 勘察设计院成果确认
            return new Promise(function (resolve, reject) {
                var confirmUrl = configure.SURVEYDESIGN_GAIN_CONFIRM_HTTP;
                configureCom.postAjax(confirmUrl, JSON.stringify(confirmGain.param.data)).then(function (res) {
                    resolve(res);
                }, function (err) {
                    reject(err);
                });
            });
        },
        cancelConfirmGain:function () {
            //取消确认,取回
            return new Promise(function (resolve, reject) {
                var confirmUrl = configure.SURVEYDESIGN_GAIN_CANCEL_CONFIRM_HTTP;
                configureCom.postAjax(confirmUrl, JSON.stringify(confirmGain.param.data)).then(function (res) {
                    resolve(res);
                }, function (err) {
                    reject(err);
                });
            });
        }
    };
    exports('confirmGain', confirmGain);
});